﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;

namespace GroupThreeMESProject.Service.ProcurementPlanService.Publishers
{
    public class MyServiceSend : ITransientDependency
    {
        private readonly IDistributedEventBus distributedEventBus;

        public MyServiceSend(IDistributedEventBus distributedEventBus)
        {
            this.distributedEventBus = distributedEventBus;
        }
        public virtual async Task ChangeStockCountAsync(string message)
        {
            await distributedEventBus.PublishAsync(
               new StockCountChangedEto
               {
                   Message = message,
               }
                );
        }
    }
}
